;$(function () {
  let gid = location.href.split("?")[1];
  console.log(gid)
  $.ajax({
    url: "./dt/query",
    type: 'get',
    data: {ms: gid}
  }).then(function (res) {
    layer.msg(res.msg);
    render(res.data[0]);
    console.log(res.data)
  })

  function render(list) {
    console.log(list);
    console.log(list.g_title);
    $(".gtl").text(list.g_title);
    $(".smllimg").find("img").prop("src", `${list.g_img1}`);

    $(".picimg").find("img").each(function (index, el) {
      $(el).attr('src', list[`g_img${index + 1}`])
    });

    $(".bigarea").find("img").prop("src", `${list.g_img1}`);
    $(".attle").find("span").text(`${list.g_title}`);
    $(".slog").text(`${list.g_name}`);
    $(".color").find(".cc").text(`${list.g_color}`)
  }
})